<?php
include "../../public/config/config.php";
include "../../public/include/funcs.php";
$link=conn($cfg_dbhost,$cfg_dbuser,$cfg_dbpwd,$cfg_dbname,$cfg_dbchar);
$date = date("Ymd");
$field = $_POST['field'];
$value = $_POST['value'];
$re = save($link, 'diy_hc', [$field => $value], "date=$date");
echo $re;



// $arr = select($link, 'diy_hc', "date=".$date);
// foreach($arr[0] as $k=>$v){
// 	if(preg_match("/num/", $k)){
// 		$arr_num[$k] = $v;
// 	}
// }
// echo json_encode($arr_num);

// echo "<pre>";
// print_r($post);
// echo "</pre>";
?>